home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 640 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  47 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Message-ID: <w7t6sMDBDaUz1@mount7.mountain.rhein-ruhr.de>
  3. From: NATHAN@MOUNTAIN.RHEIN-RUHR.DE (Stefan Huelswitt)
  4. Path: uhu.rhein-ruhr.de!mountain.rhein-ruhr.de
  5. Subject: Re: Is this a SAS/C bug or have I coded it wrong?
  6. Date: Sat, 06 Jan 1996 19:42:20 +0100
  7. X-Mailer: MicroDot 1.11beta15 [REGISTERED 0000bd]
  8. References: <4cfrc5$gsc@misery.millcomm.com>
  9. X-Gateway: ZCONNECT zc.rhein-ruhr.de [UNIX/Connect v0.74b]
  10. MIME-Version: 1.0
  11. Content-Type: text/plain; charset=ISO-8859-1
  12. Content-Transfer-Encoding: 8bit
  13. X-ZC-Post: Birtenerstr. 5a; 46487 Wesel
  14. X-ZC-Telefon: V+49-2803-8572Q
  15.  
  16. Reply to "Is this a SAS/C bug or have I coded it wrong?"
  17. (from llucius@millcomm.com (Yambo) on 04.01.1996, 05:16:37)
  18.  
  19. Hi!
  20.  
  21. > Is this a SAS/C bug or am I getting more blind???
  22. >    tmpbuf[10];
  23. >    int
  24. >    test( void )
  25. >    {
  26. >       if ( tmpbuf[0] & 0x1f == 1 )
  27. >          return 1;
  28. >       return 0;
  29. >    }
  30.  
  31. The == operator has a higher priority than the & operator.
  32.  
  33.  if ( ( tmpbuf[0] & 0x1f ) == 1 )
  34.  
  35. This should cure the problem
  36.  
  37. Bye ...
  38.  
  39. --
  40. Stefan Huelswitt              | GCS/E d- s+/-- a- C++(++++) US++++ P L- E- W+
  41. nathan@mountain.rhein-ruhr.de |   //  N++@ o-- w(--) O M(-) V- PGP+ t(-) R(++)
  42. 2:2440/315                    | \X/   tv-(+) b+(+++) DI? D-- G+ e++ h! r- y?
  43.